#pragma once

// Copyright (c) 2010 Manuel Peinado Gallego <manuel.peinado@gmail.com>
// Distributed under the MIT license

// MainFrm.h : interface of the CMainFrame class
//


#include "SceneTreeView.h"
#include "ClassView.h"
#include "OutputWnd.h"
#include "PropertiesWnd.h"
#include "View3d.h"

class CMFCManipToolBar : public CMFCToolBar
{
public: 
    void OnReset() override;
};



class CMainFrame : public CFrameWndEx
{
    
protected: // create from serialization only
    CMainFrame();
    DECLARE_DYNCREATE(CMainFrame)

    // Implementation of SelectionChangeListener
    void onSelectionChanged(SelectionManager * sender);
    bool m_blockMenuPresent;

// Attributes
public:

    CMFCToolBarComboBoxButton * getManipPivotComboBtn();
    CMFCToolBarComboBoxButton * getManipFrameComboBtn();

// Operations
public:

// Overrides
public:
    virtual BOOL PreCreateWindow(CREATESTRUCT& cs) override;
    virtual BOOL LoadFrame(UINT nIDResource, 
                           DWORD dwDefaultStyle = WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, 
                           CWnd* pParentWnd = NULL, 
                           CCreateContext* pContext = NULL) override;

// Implementation
public:
    virtual ~CMainFrame();
#ifdef _DEBUG
    virtual void AssertValid() const;
    virtual void Dump(CDumpContext& dc) const;
#endif

    //CMFCMenuBar       m_wndMenuBar;
protected: // control bar embedded members
    CMFCToolBar       m_wndToolBar;
    CMFCManipToolBar  m_manipulationToolBar;
    CMFCDropDownToolBar m_dropDownToolBar;
    friend void CMFCManipToolBar::OnReset();
    CMFCStatusBar     m_wndStatusBar;
    CMFCToolBarImages m_UserImages;
    SceneTreeView     m_wndTreeCtrl;
    COutputWnd        m_wndOutput;
    CPropertiesWnd    m_wndProperties;

    CMenu m_mainMenu;
    
    HACCEL m_pyAccel;

// Generated message map functions
protected:
    afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
    afx_msg void OnViewCustomize();
    afx_msg LRESULT OnToolbarCreateNew(WPARAM wp, LPARAM lp);
    afx_msg void OnApplicationLook(UINT id);
    afx_msg void OnUpdateApplicationLook(CCmdUI* pCmdUI);
    DECLARE_MESSAGE_MAP()


    BOOL CreateDockingWindows();
    void SetDockingWindowIcons(BOOL bHiColorIcons);
public:
    afx_msg void OnClose();
    virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
    virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
};


